#ifndef __COMUNICATION_H__
#define __COMUNICATION_H__

#define ERRORSOCKET -1
#define ERRORHOST -2
#define ERRORSENDTCP -3
#define ERRORRCVTCP -4
#define ERRORCONNECT -5
#define ERRORACCEPT -6
#define ERRORSENDUDP -7
#define ERRORRCVUDP -8
#define NO_DESC 0
#define BLOCK 0

int get_udp_sock();

int get_tcp_sock();

int bks_init_udp();

int bks_create_tcp();

int bks_init_server_socket(int port);

int bks_send_tcp(int sock, char pdu[]);

int bks_rcv_tcp(int sock, char pdu[]);

int bks_send_client_udp(char pdu[], char* name, int port);

int bks_send_server_udp(char pdu[]);

int bks_rcv_udp(char pdu[]);

int bks_accept();

int bks_connect(int sock, char* name, int port);

void bks_disconnect(int sock);

void bks_close();

int get_data_from(int sock1, int sock2);

#endif

